-- GENERATED SPELL FOR [Hecklefang Hyena] --


function spell0_4127(pUnit, Event) --@Bite,n/a--
pUnit:FullCastSpellOnTarget(17255,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4127', 636, 1)
end

function spell1_4127(pUnit, Event) --@Bite,n/a--
pUnit:FullCastSpellOnTarget(17256,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4127', 621, 1)
end

function spell2_4127(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1753,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4127', 0, 1)
end

function spell3_4127(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14916,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4127', 0, 1)
end

function spell4_4127(pUnit, Event) --@Tendon Rip,n/a--
pUnit:FullCastSpellOnTarget(50271,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4127', 6000, 1)
end

function spell5_4127(pUnit, Event) --@Tendon Rip,n/a--
pUnit:FullCastSpellOnTarget(53571,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4127', 6000, 1)
end

function Sorts_4127(pUnit, Event)
local choix_sorts_4127 = math.random(0, 5)
if choix_sorts_4127 == 0 then
pUnit:RegisterEvent('spell0_4127', 1, 1)
end
if choix_sorts_4127 == 1 then
pUnit:RegisterEvent('spell1_4127', 1, 1)
end
if choix_sorts_4127 == 2 then
pUnit:RegisterEvent('spell2_4127', 1, 1)
end
if choix_sorts_4127 == 3 then
pUnit:RegisterEvent('spell3_4127', 1, 1)
end
if choix_sorts_4127 == 4 then
pUnit:RegisterEvent('spell4_4127', 1, 1)
end
if choix_sorts_4127 == 5 then
pUnit:RegisterEvent('spell5_4127', 1, 1)
end
end

function mob4127_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4127', math.random(1500, 3000), 1)
end

function mob4127_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4127_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4127_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4127, 1, 'mob4127_Action')
RegisterUnitEvent(4127, 2, 'mob4127_Leave')
RegisterUnitEvent(4127, 3, 'mob4127_Kill')
RegisterUnitEvent(4127, 4, 'mob4127_Die')
